package com.testMvc;

import com.exper.MyAop;
import com.exper.MyAopClent;
import com.exper.MyAopService;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

public class aoptest {
    public static void main(String[] arg) {
        MyAopService t = new MyAopClent();
        InvocationHandler aop = new MyAop(t);

        MyAopService p = (MyAopService) Proxy.newProxyInstance(t.getClass().getClassLoader(), t.getClass().getInterfaces(), aop);
        p.tran();

    }

}
